//
//  HJImageView.m
//  KaiChat
//
//  Created by lx on 2024/3/25.
//

#import "HJImageView.h"

@interface HJImageView()

@property (nonatomic, weak) UIImageView *videoFlagView;

@end


@implementation HJImageView
 
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
        UIImageView *videoFlagView = [UIImageView addToView:self];
        videoFlagView.image = [UIImage imageNamed:@"cell_video_icon"];
        [videoFlagView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.offset(0);
        }];
        videoFlagView.hidden = YES;
        _videoFlagView = videoFlagView;
    }
    return self;
}

- (void)setShowVideoFlag:(BOOL)showVideoFlag {
    _showVideoFlag = showVideoFlag;
    
    _videoFlagView.hidden = !showVideoFlag;
}


@end
